﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class Resumen1Fact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As Resumen1BE
        Dim tmpResumen1 As Resumen1BE = New Resumen1BE()
        Try
            With tmpResumen1
                .Cantidad = convertDTFromDb.ConvertDecimal(dr.Item("Cantidad"))
                .Clave = convertDTFromDb.ConvertString(dr.Item("Clave"))
                .Cliente = convertDTFromDb.ConvertString(dr.Item("Cliente"))
                .Costo = convertDTFromDb.ConvertDecimal(dr.Item("Costo"))
                .Desc1 = convertDTFromDb.ConvertDecimal(dr.Item("Desc1"))
                .Descripcion = convertDTFromDb.ConvertString(dr.Item("Descripcion"))
                .Estatus = convertDTFromDb.ConvertString(dr.Item("Estatus"))
                .Fecha = convertDTFromDb.convertDateTime(dr.Item("Fecha"))
                .Folio = convertDTFromDb.convertInt32(dr.Item("Folio"))
                .Id = convertDTFromDb.convertInt32(dr.Item("Id"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .Importe = convertDTFromDb.ConvertDecimal(dr.Item("Importe"))
                .Importe1 = convertDTFromDb.ConvertDecimal(dr.Item("Importe1"))
                .Iva = convertDTFromDb.ConvertDecimal(dr.Item("Iva"))
                .Numero = convertDTFromDb.convertInt32(dr.Item("Numero"))
                .Partida = convertDTFromDb.ConvertShort(dr.Item("Partida"))
                .PU = convertDTFromDb.ConvertDecimal(dr.Item("PU"))
                .Serie = convertDTFromDb.ConvertString(dr.Item("Serie"))
                .SubT = convertDTFromDb.ConvertDecimal(dr.Item("SubT"))
                .Total = convertDTFromDb.ConvertDecimal(dr.Item("Total"))
                .Usr = convertDTFromDb.ConvertString(dr.Item("Usr"))
                .Utilidad = convertDTFromDb.ConvertDecimal(dr.Item("Utilidad"))
            End With
            Return tmpResumen1
        Catch ex As Exception
            Throw
        Finally
            tmpResumen1 = Nothing
        End Try
    End Function
End Class
